package com.lucy.nepu.system.draft;

import com.lucy.common.core.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serializable;

@Getter
@Setter
@ToString
@RequiredArgsConstructor
@Entity
@Table(name = "nepu_draft")
@ApiModel("草稿记录")
public class Draft extends BaseEntity implements Serializable {

    @Column(name = "user_id")
    @ApiModelProperty("用户ID")
    Long userId;

    @ApiModelProperty("表单标识ID")
    @Column(name = "form_id")
    String formId;

    @ApiModelProperty("表单JSON字符串")
    @Column(name = "form_json_str",length = 2048)
    String formJsonStr;

    /**
     * 0 删除状态
     * 1 正常状态
     */
    @ApiModelProperty(value = "草稿状态",notes = "")
    @Column(name = "status")
    Integer status;
}
